﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DapperExtensions.Mapper;

namespace ZLWeb.WebApiEntity.EasyUse
{
    public class ywInfo
    {
        private string _oprcardno=string.Empty;
        private string _oprbrname = string.Empty;
        private string _oprname = string.Empty;
        private string _oprywsno = string.Empty;
        private string _oprywdrwsno = string.Empty;
        private string _oprskbrname = string.Empty;
        private string _oprskppname = string.Empty;
        private string _oprywwindow = string.Empty;
        private string _oprywbno = string.Empty;
        private string _oprsummary = string.Empty;
        private string _oprcellphone = string.Empty;
        private DateTime? _oprtime = DateTime.Now;
        private DateTime? _oprywdate = DateTime.Now;
        private DateTime? _oprskywdate = DateTime.Now;

        /// <summary>
        ///  操作记录：凭证号
        /// </summary>
        public string oprcardno
        {
            get { return _oprcardno; }
            set { _oprcardno = value; }
        }

        /// <summary>
        ///  操作记录：凭证类型：1-实体卡卡号2-微信号 3-支付宝
        /// </summary>
        public short oprctype { get; set; }

        /// <summary>
        ///  操作记录：卡种id
        /// </summary>
        public int oprcgsid { get; set; }

        /// <summary>
        ///  操作记录：折扣类别id
        /// </summary>
        public int oprdisid { get; set; }

        /// <summary>
        ///  操作对象：押金
        /// </summary>
        public decimal oprcdeposit { get; set; }

        /// <summary>
        ///  操作对象：工本费
        /// </summary>
        public decimal oprcfee { get; set; }

        /// <summary>
        ///  操作记录：发生时间(自然时间)
        /// </summary>
        public DateTime? oprtime
        {
            get { return _oprtime; }
            set { _oprtime = value; }
        }

        /// <summary>
        ///  操作记录：发生地点id(分支机构)
        /// </summary>
        public int oprbrid { get; set; }

        /// <summary>
        ///  操作记录：发生地点名称
        /// </summary>
        public string oprbrname
        {
            get { return _oprbrname; }
            set { _oprbrname = value; }
        }

        /// <summary>
        ///  操作记录：执行人id(员工id)
        /// </summary>
        public int oprid { get; set; }

        /// <summary>
        ///  操作记录：执行人名称
        /// </summary>
        public string oprname
        {
            get { return _oprname; }
            set { _oprname = value; }
        }

        /// <summary>
        ///  事件关联：业务流水号
        /// </summary>
        public string oprywsno
        {
            get { return _oprywsno; }
            set { _oprywsno = value; }
        }

        /// <summary>
        ///  事件关联：业务明细流水号
        /// </summary>
        public string oprywdrwsno
        {
            get { return _oprywdrwsno; }
            set { _oprywdrwsno = value; }
        }

        /// <summary>
        ///  事件关联：业务营业日
        /// </summary>
        public DateTime? oprywdate
        {
            get { return _oprywdate; }
            set { _oprywdate = value; }
        }

        /// <summary>
        ///  事件关联：收款营业日
        /// </summary>
        public DateTime? oprskywdate
        {
            get { return _oprskywdate; }
            set { _oprskywdate = value; }
        }

        /// <summary>
        ///  事件关联：收款门店id
        /// </summary>
        public int oprskbrid { get; set; }

        /// <summary>
        ///  事件关联：收款门店名称
        /// </summary>
        public string oprskbrname
        {
            get { return _oprskbrname; }
            set { _oprskbrname = value; }
        }

        /// <summary>
        ///  事件关联：收款品牌id
        /// </summary>
        public int oprskppid { get; set; }

        /// <summary>
        ///  事件关联：收款品牌名称
        /// </summary>
        public string oprskppname
        {
            get { return _oprskppname; }
            set { _oprskppname = value; }
        }

        /// <summary>
        ///  事件关联：业务界面名称。显示字段。
        /// </summary>
        public string oprywwindow
        {
            get { return _oprywwindow; }
            set { _oprywwindow = value; }
        }

        /// <summary>
        ///  事件关联：业务单据号。显示字段。
        /// </summary>
        public string oprywbno
        {
            get { return _oprywbno; }
            set { _oprywbno = value; }
        }

        /// <summary>
        ///  事件关联：充值现金钱包
        /// </summary>
        public decimal oprczxj { get; set; }

        /// <summary>
        ///  事件关联：充值增值钱包
        /// </summary>
        public decimal oprczzz { get; set; }

        /// <summary>
        ///  事件关联：充积分
        /// </summary>
        public int oprczjf { get; set; }

        /// <summary>
        ///  事件关联：业务摘要信息。显示字段。
        /// </summary>
        public string oprsummary
        {
            get { return _oprsummary; }
            set { _oprsummary = value; }
        }

        /// <summary>
        ///  事件关联：手机号
        /// </summary>
        public string oprcellphone
        {
            get { return _oprcellphone; }
            set { _oprcellphone = value; }
        }
    }

    public class ywInfoMapper : ClassMapper<ywInfo>
    {
        public ywInfoMapper()
        {
            Table("#ywInfo");
            Map(f => f.oprcardno).Column("oprcardno");
            Map(f => f.oprctype).Column("oprctype");
            Map(f => f.oprcgsid).Column("oprcgsid");
            Map(f => f.oprdisid).Column("oprdisid");
            Map(f => f.oprcdeposit).Column("oprcdeposit");
            Map(f => f.oprcfee).Column("oprcfee");
            Map(f => f.oprtime).Column("oprtime");
            Map(f => f.oprbrid).Column("oprbrid");
            Map(f => f.oprbrname).Column("oprbrname");
            Map(f => f.oprid).Column("oprid");
            Map(f => f.oprname).Column("oprname");
            Map(f => f.oprywsno).Column("oprywsno");
            Map(f => f.oprywdrwsno).Column("oprywdrwsno");
            Map(f => f.oprywdate).Column("oprywdate");
            Map(f => f.oprskywdate).Column("oprskywdate");
            Map(f => f.oprskbrid).Column("oprskbrid");
            Map(f => f.oprskbrname).Column("oprskbrname");
            Map(f => f.oprskppid).Column("oprskppid");
            Map(f => f.oprskppname).Column("oprskppname");
            Map(f => f.oprywwindow).Column("oprywwindow");
            Map(f => f.oprywbno).Column("oprywbno");
            Map(f => f.oprczxj).Column("oprczxj");
            Map(f => f.oprczzz).Column("oprczzz");
            Map(f => f.oprczjf).Column("oprczjf");
            Map(f => f.oprsummary).Column("oprsummary");
            Map(f => f.oprcellphone).Column("oprcellphone");
        }
    }
}
